package com.woniuxy;

import com.woniuxy.log.Log;
import com.woniuxy.log.Meth;
import com.woniuxy.service.UserService;
import com.woniuxy.service.impl.UserServiceImpl;
import com.woniuxy.service.impl.UserServiceImpl02;

public class Test {
    public static void main(String[] args) {
        //第一个实现类对象
        UserService userService = new UserServiceImpl();
        //第二个实现类对象
        UserService userService02 = new UserServiceImpl02();
        //jdk代理工厂对象
        Log log = new Log();
        UserService userService1 = (UserService) log.craatFactory(userService);
        UserService userService2 = (UserService) log.craatFactory(userService02);
        userService1.addUser();
        userService2.addUser();
    }
}
